/* ========================
   General Scaling Rules
======================== */
* {
  box-sizing: border-box;
}

html {
  font-size: 100%; /* base scaling */
}

body {
  margin: 0;
  padding: 0;
}

/* Images always fit container */
img {
  max-width: 100%;
  height: auto;
}

/* Sections stay same layout but scale */
.daftar,
.kategori,
.jenama,
.jenis,
.kenapa {
  padding: 40px 5%;
  background-color: white;
  text-align: center;
}

/* Wrapper max width but fluid */
.daftar-wrapper,
.carousel-container,
.kategori-wrapper,
.jenis-container,
.kenapa-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ========================
   Daftar
======================== */
.daftar-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}
.daftar-img:hover {
  transform: scale(1.02);
}

/* ========================
   Carousel
======================== */
.carousel-container {
  width: 1200px; /* match image width exactly */
  height: 566px; /* match image height exactly */
  overflow: hidden;
  position: relative;
  border: 3px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  margin: 0 auto; /* center on page */
}

.carousel-slide {
  display: flex;
  width: 400%; /* 4 images × 100% */
  height: 100%;
  animation: slide 9s infinite;
}

.carousel-slide img {
  flex: 0 0 1200px; /* exact image width */
  width: 1200px;    /* exact image width */
  height: 566px;    /* exact image height */
}

@keyframes slide {
  0%, 25%     { transform: translateX(0); }
  25.01%, 50% { transform: translateX(-1200px); }
  50.01%, 75% { transform: translateX(-2400px); }
  75.01%, 100%{ transform: translateX(-3600px); }
}



/* ========================
   Kategori
======================== */
.kategori-wrapper {
  display: flex;
  justify-content: center;
  gap: 5%;
  flex-wrap: wrap;
}

.kategori-box img {
  width: 280px;
  max-width: 100%;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.kategori-box img:hover {
  transform: scale(1.05);
}

/* ========================
   Jenama
======================== */
.jenama-container {
  position: relative;
  overflow: hidden;
  padding: 0 50px;
}

.jenama-track {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.jenama-track::-webkit-scrollbar {
  display: none;
}

.jenama-item {
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
}
.jenama-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.jenama img:hover {
  transform: scale(1.05);
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background-color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.arrow.left { left: 5px; }
.arrow.right { right: 5px; }

/* ========================
   Jenis
======================== */
.jenis-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
.jenis-item {
  width: 100px;
  height: 100px;
}
.jenis-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.jenis img:hover {
  transform: scale(1.05);
}

/* ========================
   Kenapa Pilih RiderHub
======================== */
.kenapa {
  background-color: #e53935;
}

.kenapa-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.kenapa-image {
  flex: 0.9;
}

.kenapa-image img {
  width: 80%;
  max-width: 400px;
  border-radius: 30px;
}

.kenapa-text {
  flex: 1.1;
}
.kenapa-text h4 {
  font-size: 22px;
  margin-bottom: 10px;
  color: white;
}
.kenapa-text p {
  font-size: 15px;
  color: white;
}
.kenapa-text,
.kenapa-text h4,
.kenapa-text p {
  text-align: left;
}


/* Mobile scaling — keep layout same, just shrink */
@media (max-width: 768px) {
  .kenapa-wrapper {
    flex-direction: row; /* stays same row */
    gap: 10px;
  }
  .kenapa-text h4 {
    font-size: 18px;
  }
  .kenapa-text p {
    font-size: 14px;
  }
  .kategori-box img,
  .jenama-item,
  .jenis-item {
    width: 80px;
    height: auto;
  }
}
